ci: remediate zizmor findings#8592
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Pull request dashboard statusStatus last refreshed: 2026-07-21 04:38:34 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, report it with the result you expected. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8592 +/- ##
=========================================
Coverage 91.64% 91.64%
Complexity 10348 10348
=========================================
Files 1013 1013
Lines 27380 27380
Branches 3218 3218
=========================================
Hits 25092 25092
Misses 1558 1558
Partials 730 730 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3319e1b to
77f553a
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds and hardens GitHub Actions workflows to remediate Zizmor findings (including credential persistence, cache-poisoning, dangerous triggers, and GitHub App token permission scoping), and introduces a dedicated Zizmor workflow that uploads SARIF results to code scanning.
Changes:
- Add a repository
zizmorworkflow using the OpenTelemetry shared workflow pinned to an immutable commit and with least-privilege permissions. - Reduce credential exposure by setting
persist-credentials: falseonactions/checkoutacross multiple workflows. - Apply targeted Zizmor remediations (explicit GitHub App token permissions,
zizmor: ignore[...]annotations where appropriate, and safer env usage in build commands).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/zizmor.yml | New Zizmor workflow wired for PR/push/schedule with SARIF upload permissions and pinned reusable workflow. |
| .github/workflows/sonatype-guide-dependency-audit-daily.yml | Disable persisted checkout credentials. |
| .github/workflows/reusable-link-check.yml | Disable persisted checkout credentials. |
| .github/workflows/release.yml | Disable persisted checkout credentials; tighten GitHub App token permissions; configure git auth for post-release pushes. |
| .github/workflows/prepare-release-branch.yml | Disable persisted checkout credentials; adjust git auth/token permissions for branch/PR automation. |
| .github/workflows/prepare-patch-release.yml | Disable persisted checkout credentials; adjust GitHub App token permissions for PR automation. |
| .github/workflows/javadoc-crawler.yml | Disable persisted checkout credentials. |
| .github/workflows/issue-management-feedback-label.yml | Disable persisted checkout credentials. |
| .github/workflows/gradle-wrapper-validation.yml | Disable persisted checkout credentials. |
| .github/workflows/fossa.yml | Disable persisted checkout credentials. |
| .github/workflows/detect-api-changes.yml | Document and annotate pull_request_target usage; scope GitHub App token permissions. |
| .github/workflows/codeql.yml | Disable persisted checkout credentials; annotate gradle setup for Zizmor cache-poisoning rule. |
| .github/workflows/build.yml | Disable persisted checkout credentials; annotate gradle setup; move expression-derived path into env to avoid template-injection concerns. |
| .github/workflows/build-tracecontext-testsuite.yml | Disable persisted checkout credentials. |
| .github/workflows/build-daily.yml | Disable persisted checkout credentials. |
| .github/workflows/benchmark.yml | Disable persisted checkout credentials. |
| .github/workflows/benchmark-tags.yml | Disable persisted checkout credentials. |
| .github/workflows/backport.yml | Disable persisted checkout credentials; scope GitHub App token permissions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/workflows/prepare-release-branch.yml:78
- In
create-pull-request-against-release-branch, the workflow now requests an app token withpermission-contents: write, but the subsequent step that doesgit push --set-upstream origin $branchdoes not re-rungh auth setup-gitafter switchingGH_TOKENto the app token. Withpersist-credentials: false, this makes the push rely on whatever git auth state was configured earlier in the job (currently set up usingsecrets.GITHUB_TOKEN), which can lead to pushes being attributed toGITHUB_TOKEN(and potentially not triggering downstream workflows). Configure git auth in the PR-creation step itself so the push definitely uses the app token.
with:
client-id: ${{ vars.OTELBOT_CLIENT_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
|
cc @trask to review first |
Tracked in open-telemetry/sig-security#293.
Resolves existing findings from the OpenTelemetry shared workflow.
The workflow:
regularpersona on pull requests, pushes tomain,release/*, and a randomized weekly schedule;Zizmor remediation
This change also resolves findings from these zizmor rules:
artipackedcache-poisoningdangerous-triggersgithub-apptemplate-injectionAfter merge
zizmorcode-scanning result.If enforcement unexpectedly blocks a valid change, restore
require_zizmor = falseinopen-telemetry/adminwhile leaving scanning enabled.